package com.autumn.security.user;

import java.util.ArrayList;
import java.util.List;

import com.autumn.runtime.session.claims.HashMapIdentityClaims;
import com.autumn.runtime.session.claims.IdentityClaims;

/**
 * 默认的用户
 * 
 * @author 老码农
 *
 *         2017-11-04 15:03:17
 */
public class DefaultAutumnUser implements IAutumnUser {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1022386559812921960L;

	private Long id;

	private String userName;

	/**
	 * {@link com.autumn.security.constants.UserStatusConstants}
	 */
	private Integer status;

	private String password;

	private String identityType;

	private IdentityClaims identityClaims;

	private List<String> roles;

	private List<String> permissions;

	/**
	 * 
	 */
	public DefaultAutumnUser() {
		this.setIdentityClaims(new HashMapIdentityClaims());
		this.setRoles(new ArrayList<>());
		this.setPermissions(new ArrayList<>());
	}

	@Override
	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@Override
	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	@Override
	public String getIdentityType() {
		return identityType;
	}

	public void setIdentityType(String identityType) {
		this.identityType = identityType;
	}

	@Override
	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	@Override
	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	@Override
	public IdentityClaims getIdentityClaims() {
		return identityClaims;
	}

	public void setIdentityClaims(IdentityClaims identityClaims) {
		this.identityClaims = identityClaims;
	}

	@Override
	public List<String> getRoles() {
		return roles;
	}

	public void setRoles(List<String> roles) {
		this.roles = roles;
	}

	@Override
	public List<String> getPermissions() {
		return permissions;
	}

	public void setPermissions(List<String> permissions) {
		this.permissions = permissions;
	}

}
